﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Project_1
{
    abstract public class TireSpecs
    {
        private bool coolness;
        public bool Coolness
        {
            get { return coolness; }
            set { coolness = value; }
        }

        private int mmWidth;
        public int MMWidth
        {
            get { return mmWidth; }
            set { mmWidth = value; }
        }

        private int percentWidth;
        public int PercentWidth
        {
            get { return percentWidth; }
            set { percentWidth = value; }
        }

        private int rimSize;
        public int RimSize
        {
            get { return rimSize; }
            set { rimSize = value; }
        }

        public double CalculateWidth()
        {
            double widthInInches = Math.Round((double)this.MMWidth / 25.4, 4);
            return widthInInches;
        }

        public string CostIndicator()
        {
            string cost;
            if (this.MMWidth <= 235)
                cost = "$";
            else if (this.MMWidth <= 285)
                cost = "$$";
            else
                cost = "$$$";
            return cost;
        }

        public double CalculateSidewall()
        {
            double sidewall = Math.Round(this.CalculateWidth() * this.PercentWidth / 100, 4);
            return sidewall;
        }

        public double CalculateHeight()
        {
            double height = Math.Round(this.CalculateSidewall() * 2 + this.RimSize, 4);
            return height;
        }

        public double CalculateCircumference()
        {
            double circumference = Math.Round(this.CalculateHeight() * Math.PI, 4);
            return circumference;
        }

        public double CalculateRevsPerMile(double speed)
        {
            double revsPerMile = 63360 / this.CalculateCircumference();
            double revs = Math.Round(revsPerMile, 4);
            return revs;
        }

        public abstract void CheckCoolness();
    }
}
